liyideMacBook-Pro:~ leeyi$ erl -mnesia dir '"/tmp/mnesia_store"' -name mynode
Erlang/OTP 17 [erts-6.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.3  (abort with ^G)
(mynode@liyideMacBook-Pro.local)1> mnesia:create_schema([node()]).
ok
(mynode@liyideMacBook-Pro.local)2> mnesia:start().
ok
(mynode@liyideMacBook-Pro.local)3> mnesia:info().
---> Processes holding locks <--- 
---> Processes waiting for locks <--- 
---> Participant transactions <--- 
---> Coordinator transactions <---
---> Uncertain transactions <--- 
---> Active tables <--- 
schema         : with 1        records occupying 412      words of mem
===> System info in version "4.12.4", debug level = none <===
opt_disc. Directory "/tmp/mnesia_store" is used.
use fallback at restart = false
running db nodes   = ['mynode@liyideMacBook-Pro.local']
stopped db nodes   = [] 
master node tables = []
remote             = []
ram_copies         = []
disc_copies        = [schema]
disc_only_copies   = []
[{'mynode@liyideMacBook-Pro.local',disc_copies}] = [schema]
2 transactions committed, 0 aborted, 0 restarted, 0 logged to disc
0 held locks, 0 in queue; 0 local transactions, 0 remote
0 transactions waits for other nodes: []
ok
(mynode@liyideMacBook-Pro.local)4> cd (workspace/erl_demo).
** exception error: an error occurred when evaluating an arithmetic expression
     in operator  '/'/2
        called as workspace / erl_demo
(mynode@liyideMacBook-Pro.local)5> cd ("workspace/erl_demo").
/Users/leeyi/workspace/erl_demo
ok
(mynode@liyideMacBook-Pro.local)6> pwd().
/Users/leeyi/workspace/erl_demo
ok
(mynode@liyideMacBook-Pro.local)7> ls().
create_tables.beam     create_tables.erl      
ok
(mynode@liyideMacBook-Pro.local)8> create_tables:init_tables().
{atomic,ok}
(mynode@liyideMacBook-Pro.local)9> mnesia:info().
---> Processes holding locks <--- 
---> Processes waiting for locks <--- 
---> Participant transactions <--- 
---> Coordinator transactions <---
---> Uncertain transactions <--- 
---> Active tables <--- 
contributor    : with 0        records occupying 305      words of mem
project        : with 0        records occupying 305      words of mem
user           : with 0        records occupying 305      words of mem
schema         : with 4        records occupying 763      words of mem
===> System info in version "4.12.4", debug level = none <===
opt_disc. Directory "/tmp/mnesia_store" is used.
use fallback at restart = false
running db nodes   = ['mynode@liyideMacBook-Pro.local']
stopped db nodes   = [] 
master node tables = []
remote             = []
ram_copies         = [contributor,project,user]
disc_copies        = [schema]
disc_only_copies   = []
[{'mynode@liyideMacBook-Pro.local',disc_copies}] = [schema]
[{'mynode@liyideMacBook-Pro.local',ram_copies}] = [user,project,contributor]
5 transactions committed, 0 aborted, 0 restarted, 6 logged to disc
0 held locks, 0 in queue; 0 local transactions, 0 remote
0 transactions waits for other nodes: []
ok
(mynode@liyideMacBook-Pro.local)10> create_tables:insert_project(simple_cache, "a simple cache application").
** exception error: undefined function create_tables:insert_project/2
(mynode@liyideMacBook-Pro.local)11> create_tables:insert_project(simple_cache, "a simple cache application").
** exception error: undefined function create_tables:insert_project/2
(mynode@liyideMacBook-Pro.local)12> create_tables:insert_project(simple_cache, "a simple cache application").
** exception error: undefined function create_tables:insert_project/2
(mynode@liyideMacBook-Pro.local)13> create_tables:insert_project(simple_cache, "a simple cache application").
** exception error: undefined function create_tables:insert_project/2
(mynode@liyideMacBook-Pro.local)14> ls().
create_tables.beam     create_tables.erl      
ok
(mynode@liyideMacBook-Pro.local)15> c(create_tables).
{ok,create_tables}
(mynode@liyideMacBook-Pro.local)16> create_tables:insert_project(simple_cache, "a simple cache application").
ok
(mynode@liyideMacBook-Pro.local)17> create_tables:insert_user(1, martin, [simple_cache]).                              
{atomic,ok}
(mynode@liyideMacBook-Pro.local)18> mnesia:dirty_read(contributor, 1).
[{contributor,1,simple_cache}]
